<?php
require("../../../class2.php");
require("../library/admin/adminapi.php");

if(!getperms("P")){header("location:".e_BASE."index.php"); exit; }
require_once(e_ADMIN."auth.php");

$status = $tp->toDB($_REQUEST['status']);
if ($status == "ok") $ns->tablerender("<center>".lan_global_status."</center>", "<center>".lan_global_updated."</center>");

//
// Process the Form
//
if($_POST["subbed"]) {
    if($_POST["store_order_id"]=="") {
        $order_id = 0;
    } else {
        $order_id = $_POST["store_order_id"];
    }
    e107shop_admin_process_settings($_POST["faction"], $_POST["store_name"], 
    $_POST["order_email"], $_POST["use_coupons"], $_POST["store_currency"], $_POST["currency_symbol"], 
    $order_id, $_POST["product_order"], $_POST["per_page"], $_POST["cat_display"], 
    $_POST["customer_member"], $_POST["tax_inc"], $_POST["tax_rate"], $_POST["postage_method"], 
    $_POST["warning_level"], $_POST["minus_stock"], $_POST["license"], $_POST["download_dir"], 
    $_POST["store_address1"], $_POST["store_address2"], $_POST["store_address3"], 
    $_POST["store_address4"], $_POST["thumbnail_size"]);
}

//
// Display the form
//
e107shop_manage_settings($_GET["a"]);

require_once(e_ADMIN."footer.php");
